<template name="header_notifications">
  <li class="nav-item dropdown dropdown-navbar" id="notification-dropdown">
    <a class="nav-icon mr-2" href="#" id="notification-dropdown-content" role="button" data-toggle="dropdown">
      <i class="material-icons">notifications</i>
      {{#if results.count}}
        <span class="hint hint-danger"></span>
      {{/if}}
    </a>
    <div class="dropdown-menu dropdown-notification py-0">
      <div class="dropdown-menu-header border-bottom">
        <span>通知</span>
        {{#if results.count}}
          <a href="#" class="mark-all-read">全部标记为已读</a>
        {{/if}}
      </div>
      <div class="dropdown-menu-content" id="notification-dropdown-ps">
        <div class="listview listview-notifications py-0">
          {{#each result in results}}
            {{> notifications_list_item notification=result}}
          {{else}}
            {{#unless loading}}
              <p class="text-center text-muted mt-3">Good，没有新通知 ˙ω˙</p>
            {{else}}
              {{> loader_ball_beat}}
            {{/unless}}
          {{/each}}
        </div>
      </div>
      <div class="dropdown-menu-footer">
        <a class="link disabled" href="/notifications">查看全部</a>
      </div>
    </div>
  </li>
</template>